package com.neusoft.neu24.nep.cfg;


import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.function.Consumer;
import java.util.function.Function;

@Slf4j
@Configuration
public class RecStrConsumer {

    @Bean
    public Function<String, String> toUpperCase() {
        log.info("创建消费者  ------ > RecStrConsumer");
        return String::toUpperCase;
    }

    //创建消费者
    @Bean
    public Consumer<String> im() {
        return str -> {
            log.info("创建消费者  ------ > RecStrConsumer");
            log.info("接收字符串，im-group-topic，---" + str);
        };
    }
}
